home *** CD-ROM | disk | FTP | other *** search
/ Learn Microsoft Visual Basic 6.0 Now / Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO / media / chap04 / b04d015.cc2 < prev    next >
Text File  |  1998-06-07  |  1KB  |  28 lines

  1. 0, Your assignment in Lab 4 is to create a 
  2. 3, Magic Number program that calculates a 
  3. 6, surprise "mystery" value when you enter 
  4. 8, your age and the year of your birth. In 
  5. 11, addition to having fun with numbers, this 
  6. 14, exercise will also help you practice 
  7. 16, using variables and numeric operators in 
  8. 18, calculations. You'll also be able to 
  9. 20, experiment with using Visual Basic's order 
  10. 23, of precedence rules. To compute the 
  11. 26, correct result, your program should have a 
  12. 28, descriptive label, a text box object, a 
  13. 33, Compute button, and a Quit button. The 
  14. 38, computation work should be accomplished by 
  15. 40, the Compute button's Click event 
  16. 42, procedure. When you run the program, the 
  17. 46, utility appears in a window. Click the Compute 
  18. 49, button and enter the year that you were 
  19. 51, born. Click OK in the dialog box to 
  20. 57, continue, and enter your current age. Don't 
  21. 61, be shy now. The calculation results are 
  22. 65, displayed by a MsgBox function. The 
  23. 68, magic number has been censored here to keep 
  24. 70, you guessing. When you click OK, the 
  25. 73, number also appears on the form. To end 
  26. 77, the program, click the Quit button. Gosh, 
  27. 81, what is that magic number anyway?
  28. 84, END